﻿#region << 版 本 注 释 >>

/*----------------------------------------------------------------
 * 版权所有 (c) 2022 北京超维景生物科技有限公司 保留所有权利。
 * 
 * 创建者：huangyang
 * 电子邮箱：huangyang@tvscope.cn
 * 创建时间：2023/2/16 10:43:46
 * 版本：V1.0.0
 * 描述：
 *
 * ----------------------------------------------------------------
 * 修改人：
 * 时间：
 * 修改说明：
 *
 * 版本：V1.0.1
 *----------------------------------------------------------------*/

#endregion << 版 本 注 释 >>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ImageK.Measure
{
    /**
     * A plugin should implement this interface for minimizing a single-valued function
     * or fitting a curve with a custom fit function.
     */
    public interface UserFunction
    {
        /**
         * A user-supplied function
         * @param params    When minimizing, array of variables.
         *                  For curve fit array of fit parameters.
         *                  The array contents should not be modified.
         *                  Note that the function can get an array with more
         *                  elements then needed to specify the parameters.
         *                  Ignore the rest (and don't modify them).
         * @param x         For a fit function, the independent variable of the function.
         *                  Ignore it when using the minimizer.
         * @return          The result of the function.
         */
        public double userFunction(double[] paras, double x);
    }
}